<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>模板插值</title>
    <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
</head>
<body>
<div id="app" style="text-align: center;">
    <p v-if="show">这段文本只有在 show 为 true 时才会显示。</p>
    <p v-show="show">这段文本会根据 show 的值显示或隐藏。</p>
</div>
<script>
    const app = Vue.createApp({
        data() {
            return {
                show: true
            };
        }
    });
    app.mount('#app');

</script>
</body>
</html>
